using System.Collections;
using System.Collections.Generic;
using System;
using UnityEngine;
using PropSys;

public class StWalk : MovState
{
    public StWalk(Action<StType> swcSt, MainCtrl mc) : base(swcSt, mc) { }

    public override void Enter()
    {
        _MC.PlayAnim("Idle");
    }

    public override void Exit() { }

    public override void LogicUpd() { _MC.Move(); }

    public override void IptDir(Vector2 vec2)
    {
        _MC.GetDri(vec2);
        if (vec2.magnitude > 0.8) SwcSt(StType.Run);
        else if (vec2.magnitude == 0) SwcSt(StType.Idle);
    }

    public override void Blk() { SwcSt(StType.Blk); }

    public override void PfmSkill() { SwcSt(StType.Skill); }
    public override void Air() { _MC.Jump(); }
    public override void Dodge() { SwcSt(StType.Dodge); }
}